#pragma once
#include "MeshData.h"
class MeshSort;
class TerrianMesh:public MeshGroup
{
public:
	TerrianMesh();

	void LoadFromOsg(string strTerrainName);

	MeshData CalSelfInterMesh(bool isNeedRemoveFace = false);

	int GetHeight(double& z, double x, double y) const;

	void LoadFromDimine(string strFileName, bool isNeedCalSort, bool isNotCheck = false);

	void LoadFromOff(string strFoldPath, int iFrom, int iNum, bool isNeedCalSort);
	
	virtual void SaveData(CFileSaveData& fp);
	virtual void LoadData(CFileLoadData& fp);
protected:
	shared_ptr<MeshSort> m_pSort;
};

